import Request from "@/utils/axios";
import type {
  GetUserList,
  UserListRequest,
  EventDataListResponse,
  SaveOrUpdate,
  SaveOrUpdateRole,
  SaveOrUpdateRequest,
  SaveOrUpdateRoleRequest,
  SaveOrUpdateResponse,
  EventGroupResponse,
} from "_types/admin";
// 获取当前登录用户的菜单
export const getMenuNav = () => {
  return Request<null, EventGroupResponse>({
      url: "sys/menu/nav",
      method: "get",
  })
}
// 获取角色详情
export const getRoleDetail = (data: any) => {
  return Request<any, EventDataListResponse>({
      url: "sys/role/info/" + data,
      method: "get",
  })
}
// 获取用户详情
export const getUserDetail = (data: any) => {
  return Request<any, EventDataListResponse>({
      url: "sys/user/info/" + data,
      method: "get",
  })
}
// 获取所有角色
export const getRoleSelect = () => {
  return Request<null, EventGroupResponse>({
      url: "sys/role/select",
      method: "get",
  })
}
// 获取所有菜单(树形结构)
export const getMenuTree = () => {
  return Request<null, EventGroupResponse>({
      url: "sys/menu/allMenuTree",
      method: "get",
  })
}



